//
//  DataStream.h
//  SimulacraDB
//
//  Created by Andre Cohen on 8/9/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ByteArray.h"

@interface DataStream : NSObject {
	NSFileHandle *handle;
}

- (id)initWithFilename:(NSString *)filename;
 
- (ByteArray *)readFrom:(int)loc length:(int)len;
- (int)write:(ByteArray *)data at:(int)loc;


- (void)flush;
- (BOOL)existsFile:(NSString *)filename;
- (int)fileSize;

@end
